package com.example.designModel.single;

/**
 * Created by Quincy on 2018/9/10.
 * 双重检查  推荐
 */
public class Single3 {

    private static volatile Single3 instance;

    private Single3(){

    }

    public static Single3 getInstance(){
        if (instance == null){
            synchronized (Single3.class){
                if (instance == null){
                    instance = new Single3();
                }
            }


        }
        return instance;
    }
}
